package service;

import dao.ColorSizeDao;
import entity.ColorSize;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by jifeng on 2016/12/12 0012.
 */
public class ColorSizeService {

    @Autowired
    private ColorSizeDao colorSizeDao;

    public ColorSizeDao getColorSizeDao() {
        return colorSizeDao;
    }

    public void setColorSizeDao(ColorSizeDao colorSizeDao) {
        this.colorSizeDao = colorSizeDao;
    }

    public ColorSize addColorSize(ColorSize colorSize,int id){
        colorSizeDao.addColorSize(colorSize,id);
        return colorSize;
    }

    public List<ColorSize> findColorSizeList(){
        return colorSizeDao.findColorSizeList();
    }

    public  List<ColorSize> findColorSizeListById(int id){
        return  colorSizeDao.findColorSizeListById(id);
    }

    public void deleteColorSize(int id){
        colorSizeDao.deleteColorSize(id);
    }

    public void updateColorS(int id,String name){
        colorSizeDao.updateColorS(id,name);
    }

}
